package com.ljcalc.business.components;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.*;


/**
 * This is pool of random values
 * @author SELuoc
 *
 */
public class RandomPool extends LinkedList<Long>{
	
	public RandomPool(List<Long> pool){
		this.addAll(pool);
	}	
	
	/**
	 * return the first value in the pool after it get it, remove it from the pool.
	 * @return
	 */
	public long getNextRandomValue() {
		long ret = 0;
		
		if(this.size()>0){
			ret = this.getFirst().longValue();
			this.removeFirst();
		}
		return ret;
	}
}
